#!/bin/bash
N=4
NRun=55
Mdir="/sps/isc/rneveu/"
BATCHdir="OutputCC/"
Separator="/"

S=1

while [ $S -lt $NRun ]
do
NomFichierSH="launch_FileEditor_${S}.sh"
cat >$NomFichierSH <<EOF
#!/bin/bash
matlab R2016b -nodesktop -nojvm -nodisplay -nosplash -r "addpath('/sps/isc/rneveu/EtudeIRM/Nature');for n1=(${S}-1)*6+1:${S}*6;AnalyseCoAuthorsEditors(n1);end;quit;"
EOF

qsub -P P_isc -e $Mdir$BATCHdir -o $Mdir$BATCHdir -l h_rss=8G -l h_fsize=8G -l h_cpu=23:45:00 -l matlab=1 -l sps=1 -N FileEditor_${S} launch_FileEditor_${S}.sh

let "S += 1"

done